oracle.pg.nosql

## Class EdgeCache

- java.lang.Object
- - oracle.pg.nosql.CommonCache
  - - oracle.pg.nosql.EdgeCache

-     public class EdgeCache
      extends CommonCache

  This class implements a cache layer for OracleEdge objects. Note that by design each graph will have its own verticies cache.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearCache()` This method empties the cache
    `void` | `dumpStatistics(PrintStream ps)` Print out the statistics collected.
    `OracleEdge` | `get(Long lID)` Get an Edge from the cache using the given ID.
    `static EdgeCache` | `getInstance(OraclePropertyGraph opg)` This method returns an instance of EdgeCache.
    `void` | `put(Long lID, OracleEdge e)` Add one Edge to the cache.
    `void` | `put(OracleEdge e)` Add one Edge to the cache
    `OracleEdge` | `remove(Long lID)` Remove one Edge from the cache
    `OracleEdge` | `remove(OracleEdge e)` Remove one Edge from the cache

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### clearCache

          public void clearCache()

      This method empties the cache

    - #### dumpStatistics

          public void dumpStatistics(PrintStream ps)

      Print out the statistics collected.

    - #### get

          public OracleEdge get(Long lID)

      Get an Edge from the cache using the given ID. Returns NULL if the edge is not in the cache.

    - #### getInstance

          public static EdgeCache getInstance(OraclePropertyGraph opg)

      This method returns an instance of EdgeCache. Note that there is a 1:1 mapping between property graph names and EdgeCache objects

    - #### put

          public void put(Long lID,
                 OracleEdge e)

      Add one Edge to the cache. TODO: avoid two separate calls to this API with the same IDs but different vertices.

    - #### put

          public void put(OracleEdge e)

      Add one Edge to the cache

    - #### remove

          public OracleEdge remove(Long lID)

      Remove one Edge from the cache

    - #### remove

          public OracleEdge remove(OracleEdge e)

      Remove one Edge from the cache

Copyright © 2015 Oracle and/or its afflilates. All Rights Reserved.